import request from '@/utils/request'

// 查询药品处方管理列表
export function listPrescriptionItem(query) {
  return request({
    url: '/medical/prescriptionItem/list',
    method: 'get',
    params: query
  })
}

// 查询药品列表
export function listMedicine(query) {
  return request({
    url: '/medical/medicine/list',
    method: 'get',
    params: query
  })
}

// 查询药品处方管理详细
export function getPrescriptionItem(id) {
  return request({
    url: '/medical/prescriptionItem/' + id,
    method: 'get'
  })
}

// 新增药品处方管理
export function addPrescriptionItem(data) {
  return request({
    url: '/medical/prescriptionItem',
    method: 'post',
    data: data
  })
}

// 修改药品处方管理
export function updatePrescriptionItem(data) {
  return request({
    url: '/medical/prescriptionItem',
    method: 'put',
    data: data
  })
}

// 删除药品处方管理
export function delPrescriptionItem(id) {
  return request({
    url: '/medical/prescriptionItem/' + id,
    method: 'delete'
  })
}
